Live Agent Chat
This is a list of classes related to Live Agent Chat. The entry point into this feature is through the SCSChat
class. Refer to that class to get started.
-
The
SCSChat
class is the main interface to the Live Agent Chat SDK. This object manages the flow of Chat sessions throughout the lifetime of the app.To get an instance of this class, use the
SCServiceCloud.chat
property on+[SCServiceCloud sharedInstance]
.SCSChat
conforms to a multicast delegate model for messaging. Any class which implements theSCSChatDelegate
protocol can be added to a list of delegates to receive messages asynchronously.For UI-related chat features, see
SCSChatInterface
.See
SCSChatInterface
Declaration
Objective-C
@interface SCSChat : NSObject
Swift
class SCSChat : NSObject
-
SCSChatAvailabilityHandler block definition
Declaration
Objective-C
typedef void (^SCSChatAvailabilityHandler)(NSError *__strong, BOOL)
Swift
typealias SCSChatAvailabilityHandler = (Error?, Bool) -> Void
Parameters
error
NSError
instance describing the error. Error codes can be referenced fromSCSChatErrorCode
.available
BOOL
representing the availability of an agent to accept a chat session. -
SCSChatCompletionHandler block definition
Declaration
Objective-C
typedef void (^SCSChatCompletionHandler)(NSError *__strong, SCSChat *__weak)
Swift
typealias SCSChatCompletionHandler = (Error?, SCSChat?) -> Void
Parameters
error
NSError
instance describing the error. Error codes can be referenced fromSCSChatErrorCode
.scsc
The instance of
SCSChat
the block is acting on.
-
A
See moreSCSChatConfiguration
object contains configuration information for a Live Agent Chat session.Declaration
Objective-C
@interface SCSChatConfiguration : NSObject <NSCopying>
Swift
class SCSChatConfiguration : NSObject, NSCopying
-
Describes how a chat session is presented.
See moreDeclaration
Objective-C
enum SCSChatPresentationStyle {}
-
Reasons why a Live Agent Session may have ended.
See moreDeclaration
Objective-C
enum SCSChatEndReason {}
Swift
enum SCSChatEndReason : Int
-
Live Agent Chat ErrorCode definitions.
Errors fall into one of several groups (or series) of errors.
If there is an error thrown by a library dependency it will be included as metadata in the userInfo of the error which is returned to the application code.
See moreDeclaration
Objective-C
enum SCSChatErrorCode {}
Swift
enum SCSChatErrorCode : Int
-
Full list of Session states the Live Agent Chat framework can exhibit.
See moreDeclaration
Objective-C
enum SCSChatSessionState {}
-
A
SCSPrechatEntity
specifies a salesforce entity related to this chat session that will be found or created on session start.This object must be added to your chat configuration using
See moreSCSChatConfiguration.prechatEntities
.Declaration
Objective-C
@interface SCSPrechatEntity : NSObject
Swift
class SCSPrechatEntity : NSObject
-
A
SCSPrechatEntityField
specifies a field of a salesforce object and its relation to a specific pre-chat object defined on session creation.This object must be added to a pre-chat entity using
See moreSCSPrechatEntity.entityFieldsMaps
.Declaration
Objective-C
@interface SCSPrechatEntityField : NSObject
Swift
class SCSPrechatEntityField : NSObject
-
A
SCSPrechatObject
specifies a pre-chat field that you can send directly to the agent. This object contains alabel
and avalue
.This object does not prompt the user for information. To create a field that the user can fill in, refer to
SCSPrechatTextInputObject
.This object must be added to your chat configuration using
See moreSCSChatConfiguration.prechatFields
.Declaration
Objective-C
@interface SCSPrechatObject : NSObject <NSCopying>
Swift
class SCSPrechatObject : NSObject, NSCopying
-
An
SCSPrechatPickerObject
specifies a pre-chat picker field that is displayed before a chat session is initiated.Use the
SCSPrechatPickerObject.required
property to specify whether this field must have an option selected before initiating a session.To send data directly to the agent without user input, see
SCSPrechatObject
.This object must be added to your chat configuration using
See moreSCSChatConfiguration.prechatFields
.Declaration
Objective-C
@interface SCSPrechatPickerObject : SCSPrechatObject
Swift
class SCSPrechatPickerObject : SCSPrechatObject
-
An
SCSPrechatPickerOption
specifies an option inside a pre-chat picker field that is displayed before a chat session is initiated.This object must be added to the options array on an
See moreSCSPrechatPickerObject
.Declaration
Objective-C
@interface SCSPrechatPickerOption : NSObject
Swift
class SCSPrechatPickerOption : NSObject
-
An
SCSPrechatTextInputObject
specifies a pre-chat text input field that is displayed before a chat session is initiated.Use the
SCSPrechatTextInputObject.required
property to specify whether this field must be filled in before initiating a session.To send data directly to the agent without user input, see
SCSPrechatObject
.This object must be added to your chat configuration using
See moreSCSChatConfiguration.prechatFields
.Declaration
Objective-C
@interface SCSPrechatTextInputObject : SCSPrechatObject
Swift
class SCSPrechatTextInputObject : SCSPrechatObject